package com.zzy.j1114iocdemo.controller;

import com.zzy.j1114iocdemo.model.Dbtypes;
import com.zzy.j1114iocdemo.model.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/yml")
@RestController
public class YumController {

    @Value("${zzy.key}")
    private String key;

    @RequestMapping("/readValue")
    public String readValue(){
        return "返回的就是我们的这个key1的大小"+key;
    }


    @Autowired
    private Student student;

    @RequestMapping("/stu")
    public String readStu(){
        return student.toString();
    }


    @Autowired
    private Dbtypes db;

    @RequestMapping("/db")
    public String readDb(){
        return db.toString();
    }
}
